#include <vector>

#include "include/Visitor.h"
#include "include/Monde.h"
#include "include/Continent.h"
#include "include/Territoire.h"
#include "include/Pion.h"
#include "include/De.h"

using namespace std;


void Visitor::visit(Monde * _monde)
{
   vector<Continent*>::iterator continent_ite;
   for(continent_ite = _monde->getContinents()->begin();
       continent_ite != _monde->getContinents()->end();
       continent_ite++)
   {
      (*continent_ite)->accept( this );
   }
}

void Visitor::visit(Continent * _continent)
{
   vector<Territoire*>::iterator territoire_ite;
   for(territoire_ite = _continent->getTerritoires()->begin();
       territoire_ite != _continent->getTerritoires()->end();
       territoire_ite++)
   {
      (*territoire_ite)->accept( this );
   }
}

void Visitor::visit(Pion* _pion)
{
   _pion->accept( this );
}

void Visitor::visit(De* _de)
{
   _de->accept( this );
}
